package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FeedingPlanMapper;
import com.ruoyi.system.domain.FeedingPlan;
import com.ruoyi.system.service.IFeedingPlanService;

/**
 * 投料计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-16
 */
@Service
public class FeedingPlanServiceImpl implements IFeedingPlanService 
{
    @Autowired
    private FeedingPlanMapper feedingPlanMapper;

    /**
     * 查询投料计划
     * 
     * @param id 投料计划主键
     * @return 投料计划
     */
    @Override
    public FeedingPlan selectFeedingPlanById(Long id)
    {
        return feedingPlanMapper.selectFeedingPlanById(id);
    }

    /**
     * 查询投料计划列表
     * 
     * @param feedingPlan 投料计划
     * @return 投料计划
     */
    @Override
    public List<FeedingPlan> selectFeedingPlanList(FeedingPlan feedingPlan)
    {
        return feedingPlanMapper.selectFeedingPlanList(feedingPlan);
    }

    /**
     * 新增投料计划
     * 
     * @param feedingPlan 投料计划
     * @return 结果
     */
    @Override
    public int insertFeedingPlan(FeedingPlan feedingPlan)
    {
        return feedingPlanMapper.insertFeedingPlan(feedingPlan);
    }

    /**
     * 修改投料计划
     * 
     * @param feedingPlan 投料计划
     * @return 结果
     */
    @Override
    public int updateFeedingPlan(FeedingPlan feedingPlan)
    {
        return feedingPlanMapper.updateFeedingPlan(feedingPlan);
    }

    /**
     * 批量删除投料计划
     * 
     * @param ids 需要删除的投料计划主键
     * @return 结果
     */
    @Override
    public int deleteFeedingPlanByIds(Long[] ids)
    {
        return feedingPlanMapper.deleteFeedingPlanByIds(ids);
    }

    /**
     * 删除投料计划信息
     * 
     * @param id 投料计划主键
     * @return 结果
     */
    @Override
    public int deleteFeedingPlanById(Long id)
    {
        return feedingPlanMapper.deleteFeedingPlanById(id);
    }
}
